<?php
apf_require_page("Portal_Layout_Default");

class Portal_Home_SearchPage extends Portal_Layout_DefaultPage {
    public function get_view () {

        if(!$this->request->get_attribute("kw")){
            $this->assign_data("cs",$this->request->get_attribute("cities"));
            $this->assign_data("sy",$this->request->get_attribute("divisions"));
            $this->assign_data("bm",$this->request->get_attribute("departments"));
        }else{
            $this->assign_data("kw",$this->request->get_attribute("kw"));
            $this->assign_data("rs",json_encode($this->request->get_attribute("rs")));
            $this->assign_data("cs",$this->request->get_attribute("cs"));
            $this->assign_data("sy",$this->request->get_attribute("sy"));
            $this->assign_data("bm",$this->request->get_attribute("bm"));
            $this->assign_data("param",$this->request->get_attribute("param"));
        }
        $this->assign_data("projects",$this->request->get_attribute("projects"));
        return "SearchNew";
    }

    public static function use_boundable_styles() {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_styles(), array($path."Search.css"));
    }

    public static function use_boundable_javascripts() {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_javascripts(), array($path."SearchNew.js"));
    }

    public function get_title(){
        return "安居客内部个人门户";
    }
}
